DnD Dice Rolling Game

Overview

I decided to create a multiplayer Dice rolling game in my spare time, where the player throws dice that will tell the player which side of the dice it lands on, along with replicating the movement of the dice.

These dices rolls could then be used on the players actions to roleplay what happens.

This is the main menu where the player can decide what their player colour will be, and what colour their dice will be.

To make this even more performant, the dice are Object Pooled. What this means is instead of Spawning and Destroying the dice, the level will spawn all the dice at the start and “deactivates” the dice, so they don’t cause any performance detriments. So, when the player “spawns” a dice it just teleports a dice from the pool of dice and “activates” it.

This is all replicated as well.

This system here is me having a podium for the dnd player character to stand upon, and this would let the player move them where they wanted. This used to work but I did some testing with grid alignment that breaks it.

I also did some performance limit testing, where I spawn 500 activated dice at once and see how the game handles it. It drops to 30fps while they are all moving, but after they have settled it goes back to 80fps.

After this I fly through the dice, and the performance drops to 30 fps. And steadily rises back to 80fps.